package com.example.questionnaires.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.questionnaires.common.PageResult;
import com.example.questionnaires.common.Result;
import com.example.questionnaires.dto.UserDTO;
import com.example.questionnaires.entity.User;
import com.example.questionnaires.form.LoginForm;
import com.example.questionnaires.form.RegisterForm;
import java.util.List;

public interface UserService extends IService<User> {
    Result<UserDTO> login(LoginForm loginForm);
    Result<Void> register(RegisterForm registerForm);
    void updatePassword(Long userId, String oldPassword, String newPassword);
    User getUserById(Long id);
    List<User> getAllUsers();
    void updateUser(User user);
    void deleteUser(Long id);
    void banUser(Long id);
    void unbanUser(Long id);
    Result<PageResult<User>> list(Integer page, Integer size);
    Result<Void> add(UserDTO userDTO);
    boolean updateById(User user);
    Result<Void> deleteById(Long id);
    Result<Void> resetPassword(Long id);
    Result<Void> updateStatus(Long id, Integer status);
    User getUserFromToken(String token);
}
